<div class="container">
    <!--<div class="row">-->
    <!--<div class="col-md-offset-1 col-md-2">1. 选择捐款项目</div>-->
    <!--<div class="col-md-2">2. 选择金额和支付方式</div>-->
    <!--<div class="col-md-2">3. 支付</div>-->
    <!--</div>-->
    <div class="row panel-group" style="margin-top: 10px;">
        <div class="col-sm-3 col-md-3">
            <div style="background-color: #f6f7f9; height:620px;" id="navBg">
                <div class="nav-panel-group">
                    <div ng-repeat="item in projects" class="panel-group" id="accordion">
                        <div class="panel panel-default">
                            <div class="panel-heading nav-panel-header" ng-class="{'nav-panel-header-active': selectedProject == item || item.id == selectedProject.parent}" ng-click="selectProjectItem(item)">
                                <h4 class="panel-title">
                                    <a href="javascript:" >
                                        <span class="nav-link">{{item.name}}</span>
                                    </a>
                                </h4>
                            </div>
                            <div>
                                <div class="panel-body nav-panel-body">

                                    <li class="list-group-item" ng-repeat="child in item.children" ng-click="selectProjectItem(child)">
                                        <a href=""><span class="nav-sub-link" ng-class="{'nav-sub-link-active': selectedProject == child}">{{child.name}}</span></a>
                                    </li>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-9 col-md-9"><!--action="/pay/unifiedOrder"-->
            <form class="form-inline donate-info" action="/pay/unifiedOrder" method="post" role="form">
                <input hidden name="projectId" ng-value="donate.projectId">
                <input hidden name="projectName" ng-value="donate.projectName">
                <p>捐款金额:</p>
                <div class="row">
                    <div class="col-md-offset-1" style="width:14%; display: inline-block; text-align:center; ">
                        <button type="button" class="btn btn-default btn-lg" ng-click="selectMoney(100)"
                                ng-class="{'donation-selected-money': moneySelected == 100}">100元
                        </button>
                    </div>
                    <div style="width:14%; display: inline-block; text-align:center; ">
                        <button type="button" class="btn btn-default btn-lg" ng-click="selectMoney(500)"
                                ng-class="{'donation-selected-money': moneySelected == 500}">500元
                        </button>
                    </div>
                    <div style="width:14%; display: inline-block; text-align:center; ">
                        <button type="button" class="btn btn-default btn-lg" ng-click="selectMoney(1000)"
                                ng-class="{'donation-selected-money': moneySelected == 1000}">1000元
                        </button>
                    </div>

                    <input hidden name="totalFee" ng-value="donate.totalFee">

                    <div class="form-group" style="width:25%; display: inline-block; text-align:center; ">
                        <div class="input-group input-group-lg" ng-click="selectMoney(-1)">
                            <div class="input-group-addon">其他</div>
                            <input class="form-control" type="text" placeholder="请输入金额"
                                   style="width: 135px;padding-left: 10px;padding-right: 10px;" ng-model="customMoney"
                                   ng-class="{'donation-selected-money': moneySelected == -1} "
                                   ng-blur="customMoneyErr()">
                        </div>
                    </div>
                    <!--输入金额错误提醒-->
                    <div class="form-group donate-error" ng-if="customMoneyError == 1">
                        <div>{{customMoneyErrorMessage}}！</div>
                    </div>
                </div>
                <br>

                <p>支付平台:</p>
                <div class="row">
                    <div class="col-md-3 col-md-offset-1">
                        <div class="donation-wx-pay " ng-click="selectPayType('WX')"
                             ng-class="{'donation-selected-money': donate.payType == 'WX'}"></div>
                    </div>
                    <div class="col-md-3">
                        <div class="donation-ali-pay" ng-click="selectPayType('ALi')"
                             ng-class="{'donation-selected-money': donate.payType == 'ALi'}"></div>
                    </div>
                </div>
                <br>

                <input hidden name="payType" ng-value="donate.payType">

                <p>个人信息: </p>
                <div class="row donation-margin-10">
                    <label for="inputEmail3" class="col-md-2 control-label" style="text-align: right; "><span
                            style="color:#FF6060; ">*</span> 姓名</label>
                    <div class="col-md-6">
                        <input type="text" class="form-control input-lg" id="inputEmail3" name="userName"
                               ng-model="donate.userInfo.name" placeholder="请填写姓名" ng-blur="nameErr()">
                    </div>
                    <!--姓名错误信息-->
                    <div class="form-group donate-error" ng-if="nameError == 1">
                        <div>{{nameErrorMessage}}！</div>
                    </div>
                </div>

                <div class="row donation-margin-10">
                    <label class="col-md-2 control-label" style="text-align: right; ">身份</label>
                    <div class="row col-md-10">
                        <label class="radio-inline col-md-2 col-md-offset-1" style="height: 46px;line-height:46px;">
                            <input type="radio" name="userType" id="inlineRadio1" ng-model="donate.userInfo.userType"
                                   value=0 ng-change="showCompany()"> 男
                        </label>
                        <label class="radio-inline col-md-2" style="height: 46px; line-height:46px;">
                            <input type="radio" name="userType" id="inlineRadio2" ng-model="donate.userInfo.userType"
                                   value=1 ng-change="showCompany()"> 女
                        </label>
                        <label class="radio-inline col-md-2" style="height: 46px; line-height:46px;">
                            <input type="radio" name="userType" id="inlineRadio3" ng-model="donate.userInfo.userType"
                                   value=2 ng-change="showCompany()"> 企业
                        </label>
                    </div>
                </div>
                <div class="row donation-margin-10" ng-if="companyFlag">
                    <label for="inputCompany" class="col-md-2 control-label" style="text-align: right; ">企业</label>
                    <div class="col-md-6">
                        <input type="text" class="form-control input-lg" name="userCompany"
                               ng-model="donate.userInfo.company" id="inputCompany" placeholder="请填写企业名称"
                               ng-blur="companyNameErr()">
                    </div>
                    <!--企业名称错误信息-->
                    <div class="form-group donate-error" ng-if="companyNameError == 1">
                        <div>{{companyNameErrorMessage}}！</div>
                    </div>
                </div>

                <div class="row donation-margin-10">
                    <label for="inputEmail4" class="col-md-2 control-label" style="text-align: right; "><span
                            style="color:#FF6060; ">*</span> 手机</label>
                    <div class="col-md-6">
                        <input type="number" class="form-control input-lg" name="userPhoneNumber"
                               ng-model="donate.userInfo.phoneNumber" id="inputEmail4" placeholder="请填写手机"
                               ng-blur="phoneErr()">
                    </div>
                    <!--手机号码错误信息-->
                    <div class="form-group donate-error" ng-if="phoneError == 1">
                        <div>{{phoneErrorMessage}}！</div>
                    </div>
                </div>
                <div class="row donation-margin-10">
                    <label for="inputEmail6" class="col-md-2 control-label" style="text-align: right; "><span
                            style="color:#FF6060; ">*</span> 邮箱</label>
                    <div class="col-md-6">
                        <input type="email" class="form-control input-lg" name='userEmail'
                               ng-model="donate.userInfo.email" id="inputEmail6" placeholder="请填写邮箱"
                               ng-blur="emailErr()">
                    </div>
                    <!--邮箱错误信息-->
                    <div class="form-group donate-error" ng-if="emailError == 1">
                        <div>{{emailErrorMessage}}！</div>
                    </div>
                </div>
                <div class="row donation-margin-10">
                    <label class="col-md-offset-1 col-md-2 control-label">公布捐赠信息</label>
                    <div class="row col-md-9">
                        <label class="radio-inline col-md-2 col-md-offset-1" style="height: 46px;line-height:46px;">
                            <input type="radio" name="publicFlag" id="inlineRadio4" ng-model="donate.publicFlag"
                                   value=1> 是
                        </label>
                        <label class="radio-inline col-md-2" style="height: 46px; line-height:46px;">
                            <input type="radio" name="publicFlag" id="inlineRadio5" ng-model="donate.publicFlag"
                                   value=0> 否
                        </label>
                    </div>
                </div>
                <button type="submit" class="col-md-offset-3 col-md-4 btn btn-info btn-lg" ng-click="toDonate($event)">
                    确认捐款
                </button>
            </form>
        </div>
    </div>
</div>